#include "wx/wxprec.h"
#if wxUSE_ARCHIVE_STREAMS

#include "wx/archive.h"

const wxArchiveClassFactory *
wxArchiveClassFactory::Find( const wxChar *protocol, wxStreamProtocolType type ) {
  for( const wxArchiveClassFactory *f = GetFirst(); f; f = f->GetNext() )
    if( f->CanHandle( protocol, type ) ) {
      return f;
    }
  return NULL;
}

const wxArchiveClassFactory *wxArchiveClassFactory::GetFirst() {
  if( !sm_first ) {
    wxUseArchiveClasses();
  }
  return sm_first;
}

#endif
